package com.wumao.controller;

import com.wumao.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Gaowumao
 * @Decripted
 * @Email none-j@qq.com
 * @create 2021-04-21 16:45
 */
@Controller
public class ArchiveShowController {

    @Autowired
    private BlogService blogService;

    @RequestMapping("/archives")
    public String archives(Model model){
        model.addAttribute("archiveMap",blogService.archiveBlog());
        model.addAttribute("blogCount",blogService.countBlog());
        return "archives_copy2";
    }



}
